home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Libraries / ThinkCPosix 1.1 / ThinkCPosix.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-02-21  |  1.9 KB  |  90 lines  |  [TEXT/KAHL]

  1. /* $Id: $ */
  2.  
  3. /*
  4.  * The aim of this project is to create a library ("Posix")
  5.  * including as many Posix functions as possible
  6.  * not included in the Think C ANSI and Unix libraries.
  7.  *
  8.  * The code has been collected from various sources.
  9.  * The following is a partial list of acknowledgements:
  10.  * mkdir(), opendir(), readdir(), closedir(), stat() --
  11.  *   Guido van Rossum, CWI, Amsterdam (July 1987)
  12.  *
  13.  * All code here is placed in the public domain
  14.  * Timothy Murphy School of Mathematics, Trinity College Dublin
  15.  * (tim@maths.tcd.ie)
  16.  */
  17.  
  18. #pragma once
  19.  
  20. #define const
  21.  
  22. #include <stdio.h>
  23. #include <stdlib.h>
  24. #include <stdarg.h>
  25. #include <string.h>
  26. #include <ctype.h>
  27. #include <time.h>
  28. #include <errno.h>
  29. #include <unix.h>
  30. #include <ansi_private.h>
  31. #include "sys/dir.h"
  32. #include "sys/stat.h"
  33. #include "sys/types.h"
  34. #include "sys/times.h"
  35. #include "dirent.h"
  36. #include "pwd.h"
  37. #include "grp.h"
  38. #include "unistd.h"
  39. #include "utime.h"
  40.  
  41. #define EOS '\0'
  42. #define SEP ':'
  43.  
  44. #define NAME_MAX FILENAME_MAX
  45. #define PATH_MAX FILENAME_MAX
  46. #define OPEN_MAX FOPEN_MAX
  47.  
  48. extern int __pid, __ppid, __uid, __gid;
  49. #define ROOT_UID    0
  50. #define ROOT_GID    0
  51.  
  52. #define ENOEXEC    26
  53. #define ENOSYS    38
  54. #define EPERM    1
  55.  
  56. #define SIGQUIT SIGINT
  57. #define SIGHUP SIGINT
  58. #define SIGPIPE SIGINT
  59.  
  60. void *alloca(unsigned);
  61.  
  62. char *strupr(char*);
  63. int chdir(char*);
  64. int chmod(char*, mode_t);
  65. int mkdir(char*, int);
  66. FILE *popen(char*, char*);
  67. int pclose(FILE*);
  68. int fcntl(int, int, int, ...);
  69. int ioctl(int, int, ...);
  70. struct passwd *getpwent(void);
  71. struct passwd *getpwnam(char*);
  72. struct passwd *getpwuid(uid_t);
  73. struct group *getgrent(void);
  74. struct group *getgrname(char*);
  75. struct group *getgrgid(gid_t);
  76. void rewinddir(DIR*);
  77. /* clock_t times(struct tms*); */
  78. mode_t umask(mode_t);
  79. int wait(int*);
  80.  
  81. /* Possible replacements */
  82.  
  83. int Stat(char*, long, struct stat*);
  84. void Abort(void);
  85. int Open(char*, int, ...);
  86. void Perror(char*);
  87. char *Getenv(char*);
  88.  
  89. int SetType(char*, FInfo);
  90.